package com.gxa.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Resource {
    //资源id
    private int resourceId;

    //资源名称
    private String resourceName;

    //资源类型
    private String resourceType;

    //上级节点
    private String  parentNode;

    //资源URL
    private String resourceURL;

    //资源排序
    private int resourceSorting;

    //创建时间
    private Date creatTime;

    //更新时间
    private Date updateTime;

    public Resource(int resourceId, String resourceName, String resourceType, String parentNode, String resourceURL, int resourceSorting, Date creatTime, Date updateTime) {
        this.resourceId = resourceId;
        this.resourceName = resourceName;
        this.resourceType = resourceType;
        this.parentNode = parentNode;
        this.resourceURL = resourceURL;
        this.resourceSorting = resourceSorting;
        this.creatTime = creatTime;
        this.updateTime = updateTime;
    }

    public int getResourceId() {
        return resourceId;
    }

    public void setResourceId(int resourceId) {
        this.resourceId = resourceId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public String getParentNode() {
        return parentNode;
    }

    public void setParentNode(String parentNode) {
        this.parentNode = parentNode;
    }

    public String getResourceURL() {
        return resourceURL;
    }

    public void setResourceURL(String resourceURL) {
        this.resourceURL = resourceURL;
    }

    public int getResourceSorting() {
        return resourceSorting;
    }

    public void setResourceSorting(int resourceSorting) {
        this.resourceSorting = resourceSorting;
    }

    @DateTimeFormat(pattern="yyyy-MM-dd")
    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    @DateTimeFormat(pattern="yyyy-MM-dd")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Resource() {
    }

    @Override
    public String toString() {
        return "Resource{" +
                "resourceId=" + resourceId +
                ", resourceName='" + resourceName + '\'' +
                ", resourceType='" + resourceType + '\'' +
                ", parentNode='" + parentNode + '\'' +
                ", resourceURL='" + resourceURL + '\'' +
                ", resourceSorting=" + resourceSorting +
                ", creatTime=" + creatTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
